import { RouteRecordRaw } from 'vue-router';
type voidFunction = (...args: any) => void
type tokenFunction = (...args: any) => string
type anyFunction = (...args: any) => any
export interface routerConfig {
    token?: tokenFunction | null,
    constantRouter?: Array<RouteRecordRaw>,
    whiteListRouter?: Array<RouteRecordRaw>,
    noAuthPath?: string,
    errorPath?: string,
    loginRedirectRouter?: string,
    dynamicRouters?: Array<RouteRecordRaw>,
    callBackBreadCrumb?: any,
    callBackLogin?: voidFunction | null,
    callBackNoAuth?: voidFunction | null,
    callBackError?: voidFunction | null,
    callBackBeforeEach: anyFunction | null,
    callBackAfterEach: voidFunction | null
}

export declare type AppInfo = {
    appCode: string
    baseUrl: string
    icon: string
    id: number
    name: string
    order: number
}

export declare type MetaType = {
    appName: string
    cache: number
    hasSubmenu: number
    hidden: number
    icon: string
    isFrame: number
    isWhite: number
    menuCode: string
    menuSort: number
    title: string
}

export interface CustomRouteRaw {
    id?: string | number,
    appInfo: AppInfo,
    component: string,
    children: CustomRouteRaw[],
    meta: MetaType,
    name: string,
    path: string,
    redirect?: string
}

